// <auto-generated />
using System;
using JasperGreenTeam11.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace JasperGreenTeam11.Migrations
{
    [DbContext(typeof(JasperGreenContext))]
    partial class JasperGreenContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.3")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

            modelBuilder.Entity("CrewProperty", b =>
                {
                    b.Property<int>("CrewsCrewId")
                        .HasColumnType("int");

                    b.Property<int>("PropertiesPropertyId")
                        .HasColumnType("int");

                    b.HasKey("CrewsCrewId", "PropertiesPropertyId");

                    b.HasIndex("PropertiesPropertyId");

                    b.ToTable("CrewProperty");
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Crew", b =>
                {
                    b.Property<int>("CrewId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CrewId"));

                    b.Property<int?>("CrewForemanID")
                        .HasColumnType("int");

                    b.Property<int?>("CrewMember1ID")
                        .HasColumnType("int");

                    b.Property<int?>("CrewMember2ID")
                        .HasColumnType("int");

                    b.Property<string>("CrewName")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("CrewId");

                    b.HasIndex("CrewForemanID");

                    b.HasIndex("CrewMember1ID");

                    b.HasIndex("CrewMember2ID");

                    b.ToTable("Crews");

                    b.HasData(
                        new
                        {
                            CrewId = 1,
                            CrewName = "Green Team A"
                        },
                        new
                        {
                            CrewId = 2,
                            CrewName = "Landscapers B"
                        },
                        new
                        {
                            CrewId = 3,
                            CrewName = "Maintenance Crew C"
                        },
                        new
                        {
                            CrewId = 4,
                            CrewName = "Tree Trimmers D"
                        },
                        new
                        {
                            CrewId = 5,
                            CrewName = "Lawn Care E"
                        });
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Customer", b =>
                {
                    b.Property<int>("CustomerId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CustomerId"));

                    b.Property<string>("Address")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("City")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Email")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("FirstName")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("LastName")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Phone")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("State")
                        .IsRequired()
                        .HasMaxLength(2)
                        .HasColumnType("nvarchar(2)");

                    b.Property<string>("Zip")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("CustomerId");

                    b.ToTable("Customers");

                    b.HasData(
                        new
                        {
                            CustomerId = 1,
                            Address = "",
                            City = "",
                            Email = "john@example.com",
                            FirstName = "John",
                            LastName = "Doe",
                            Phone = "555-1234",
                            State = "",
                            Zip = ""
                        },
                        new
                        {
                            CustomerId = 2,
                            Address = "",
                            City = "",
                            Email = "jane@example.com",
                            FirstName = "Jane",
                            LastName = "Smith",
                            Phone = "555-5678",
                            State = "",
                            Zip = ""
                        },
                        new
                        {
                            CustomerId = 3,
                            Address = "",
                            City = "",
                            Email = "alice@example.com",
                            FirstName = "Alice",
                            LastName = "Brown",
                            Phone = "555-8765",
                            State = "",
                            Zip = ""
                        },
                        new
                        {
                            CustomerId = 4,
                            Address = "",
                            City = "",
                            Email = "bob@example.com",
                            FirstName = "Bob",
                            LastName = "Green",
                            Phone = "555-4321",
                            State = "",
                            Zip = ""
                        },
                        new
                        {
                            CustomerId = 5,
                            Address = "",
                            City = "",
                            Email = "charlie@example.com",
                            FirstName = "Charlie",
                            LastName = "White",
                            Phone = "555-9876",
                            State = "",
                            Zip = ""
                        });
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Employee", b =>
                {
                    b.Property<int>("EmployeeId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("EmployeeId"));

                    b.Property<int?>("CrewId")
                        .HasColumnType("int");

                    b.Property<string>("FirstName")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("LastName")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("Role")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("EmployeeId");

                    b.HasIndex("CrewId");

                    b.ToTable("Employees");

                    b.HasData(
                        new
                        {
                            EmployeeId = 1,
                            CrewId = 1,
                            FirstName = "Ethan",
                            LastName = "Wilson"
                        },
                        new
                        {
                            EmployeeId = 2,
                            CrewId = 1,
                            FirstName = "Sophia",
                            LastName = "Davis"
                        },
                        new
                        {
                            EmployeeId = 3,
                            CrewId = 2,
                            FirstName = "Michael",
                            LastName = "Johnson"
                        },
                        new
                        {
                            EmployeeId = 4,
                            CrewId = 2,
                            FirstName = "Olivia",
                            LastName = "Martinez"
                        },
                        new
                        {
                            EmployeeId = 5,
                            CrewId = 3,
                            FirstName = "Daniel",
                            LastName = "Brown"
                        },
                        new
                        {
                            EmployeeId = 6,
                            CrewId = 3,
                            FirstName = "Emma",
                            LastName = "Anderson"
                        },
                        new
                        {
                            EmployeeId = 7,
                            CrewId = 4,
                            FirstName = "James",
                            LastName = "White"
                        },
                        new
                        {
                            EmployeeId = 8,
                            CrewId = 4,
                            FirstName = "Isabella",
                            LastName = "Thompson"
                        },
                        new
                        {
                            EmployeeId = 9,
                            CrewId = 5,
                            FirstName = "Benjamin",
                            LastName = "Lewis"
                        },
                        new
                        {
                            EmployeeId = 10,
                            CrewId = 5,
                            FirstName = "Charlotte",
                            LastName = "Hall"
                        },
                        new
                        {
                            EmployeeId = 11,
                            CrewId = 1,
                            FirstName = "Mason",
                            LastName = "Scott"
                        },
                        new
                        {
                            EmployeeId = 12,
                            CrewId = 2,
                            FirstName = "Liam",
                            LastName = "Clark"
                        },
                        new
                        {
                            EmployeeId = 13,
                            CrewId = 3,
                            FirstName = "Ava",
                            LastName = "Young"
                        },
                        new
                        {
                            EmployeeId = 14,
                            CrewId = 4,
                            FirstName = "William",
                            LastName = "Hernandez"
                        },
                        new
                        {
                            EmployeeId = 15,
                            CrewId = 5,
                            FirstName = "Emily",
                            LastName = "King"
                        });
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Payment", b =>
                {
                    b.Property<int>("PaymentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("PaymentId"));

                    b.Property<decimal>("Amount")
                        .HasPrecision(18, 2)
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("CustomerId")
                        .HasColumnType("int");

                    b.Property<DateTime>("Date")
                        .HasColumnType("datetime2");

                    b.Property<string>("PaymentMethod")
                        .HasColumnType("nvarchar(max)");

                    b.Property<int?>("ProvideServiceId")
                        .HasColumnType("int");

                    b.HasKey("PaymentId");

                    b.HasIndex("CustomerId");

                    b.HasIndex("ProvideServiceId");

                    b.ToTable("Payments");

                    b.HasData(
                        new
                        {
                            PaymentId = 1,
                            Amount = 150.00m,
                            CustomerId = 1,
                            Date = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            PaymentMethod = "Credit Card"
                        },
                        new
                        {
                            PaymentId = 2,
                            Amount = 200.00m,
                            CustomerId = 2,
                            Date = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            PaymentMethod = "PayPal"
                        },
                        new
                        {
                            PaymentId = 3,
                            Amount = 100.00m,
                            CustomerId = 3,
                            Date = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            PaymentMethod = "Debit Card"
                        },
                        new
                        {
                            PaymentId = 4,
                            Amount = 250.00m,
                            CustomerId = 4,
                            Date = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            PaymentMethod = "Bank Transfer"
                        },
                        new
                        {
                            PaymentId = 5,
                            Amount = 180.00m,
                            CustomerId = 5,
                            Date = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            PaymentMethod = "Cash"
                        });
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Property", b =>
                {
                    b.Property<int>("PropertyId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("PropertyId"));

                    b.Property<string>("Address")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("City")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<int?>("CrewForemanId")
                        .HasColumnType("int");

                    b.Property<int?>("CrewMember1Id")
                        .HasColumnType("int");

                    b.Property<int?>("CrewMember2Id")
                        .HasColumnType("int");

                    b.Property<int>("CustomerId")
                        .HasColumnType("int");

                    b.Property<string>("State")
                        .HasMaxLength(2)
                        .HasColumnType("nvarchar(2)");

                    b.Property<string>("Street")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("Zip")
                        .HasMaxLength(10)
                        .HasColumnType("nvarchar(10)");

                    b.HasKey("PropertyId");

                    b.HasIndex("CrewForemanId");

                    b.HasIndex("CrewMember1Id");

                    b.HasIndex("CrewMember2Id");

                    b.HasIndex("CustomerId");

                    b.ToTable("Properties");

                    b.HasData(
                        new
                        {
                            PropertyId = 1,
                            Address = "123 Greenway Blvd",
                            CustomerId = 1
                        },
                        new
                        {
                            PropertyId = 2,
                            Address = "456 Elm St",
                            CustomerId = 1
                        },
                        new
                        {
                            PropertyId = 3,
                            Address = "789 Oak Dr",
                            CustomerId = 2
                        },
                        new
                        {
                            PropertyId = 4,
                            Address = "101 Maple Ave",
                            CustomerId = 3
                        },
                        new
                        {
                            PropertyId = 5,
                            Address = "222 Cedar Rd",
                            CustomerId = 4
                        },
                        new
                        {
                            PropertyId = 6,
                            Address = "333 Pine Ln",
                            CustomerId = 5
                        },
                        new
                        {
                            PropertyId = 7,
                            Address = "444 Birch Pl",
                            CustomerId = 2
                        },
                        new
                        {
                            PropertyId = 8,
                            Address = "555 Walnut Ct",
                            CustomerId = 3
                        },
                        new
                        {
                            PropertyId = 9,
                            Address = "666 Aspen Trl",
                            CustomerId = 4
                        },
                        new
                        {
                            PropertyId = 10,
                            Address = "777 Willow Way",
                            CustomerId = 5
                        });
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.ProvideService", b =>
                {
                    b.Property<int>("ProvideServiceId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ProvideServiceId"));

                    b.Property<int>("CrewId")
                        .HasColumnType("int");

                    b.Property<int?>("CustomerId")
                        .HasColumnType("int");

                    b.Property<decimal>("Price")
                        .HasPrecision(18, 2)
                        .HasColumnType("decimal(18,2)");

                    b.Property<int>("PropertyId")
                        .HasColumnType("int");

                    b.Property<DateTime>("ServiceDate")
                        .HasColumnType("datetime2");

                    b.Property<int>("ServiceName")
                        .HasColumnType("int");

                    b.Property<string>("ServiceType")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("ProvideServiceId");

                    b.HasIndex("CrewId");

                    b.HasIndex("CustomerId");

                    b.HasIndex("PropertyId");

                    b.ToTable("ProvideService");

                    b.HasData(
                        new
                        {
                            ProvideServiceId = 1,
                            CrewId = 1,
                            Price = 50.00m,
                            PropertyId = 1,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Lawn Mowing"
                        },
                        new
                        {
                            ProvideServiceId = 2,
                            CrewId = 1,
                            Price = 75.00m,
                            PropertyId = 2,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Tree Pruning"
                        },
                        new
                        {
                            ProvideServiceId = 3,
                            CrewId = 2,
                            Price = 100.00m,
                            PropertyId = 3,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Garden Maintenance"
                        },
                        new
                        {
                            ProvideServiceId = 4,
                            CrewId = 2,
                            Price = 120.00m,
                            PropertyId = 4,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Seasonal Cleanup"
                        },
                        new
                        {
                            ProvideServiceId = 5,
                            CrewId = 3,
                            Price = 80.00m,
                            PropertyId = 5,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Lawn Fertilization"
                        },
                        new
                        {
                            ProvideServiceId = 6,
                            CrewId = 3,
                            Price = 50.00m,
                            PropertyId = 6,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Lawn Mowing"
                        },
                        new
                        {
                            ProvideServiceId = 7,
                            CrewId = 4,
                            Price = 90.00m,
                            PropertyId = 7,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Mulching"
                        },
                        new
                        {
                            ProvideServiceId = 8,
                            CrewId = 4,
                            Price = 110.00m,
                            PropertyId = 8,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Pest Control"
                        },
                        new
                        {
                            ProvideServiceId = 9,
                            CrewId = 5,
                            Price = 75.00m,
                            PropertyId = 9,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Tree Pruning"
                        },
                        new
                        {
                            ProvideServiceId = 10,
                            CrewId = 5,
                            Price = 200.00m,
                            PropertyId = 10,
                            ServiceDate = new DateTime(2024, 3, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            ServiceName = 0,
                            ServiceType = "Garden Design"
                        });
                });

            modelBuilder.Entity("CrewProperty", b =>
                {
                    b.HasOne("JasperGreenTeam11.Models.Crew", null)
                        .WithMany()
                        .HasForeignKey("CrewsCrewId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("JasperGreenTeam11.Models.Property", null)
                        .WithMany()
                        .HasForeignKey("PropertiesPropertyId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Crew", b =>
                {
                    b.HasOne("JasperGreenTeam11.Models.Employee", "CrewForeman")
                        .WithMany("CrewForeman")
                        .HasForeignKey("CrewForemanID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("JasperGreenTeam11.Models.Employee", "CrewMember1")
                        .WithMany("CrewMember1")
                        .HasForeignKey("CrewMember1ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("JasperGreenTeam11.Models.Employee", "CrewMember2")
                        .WithMany("CrewMember2")
                        .HasForeignKey("CrewMember2ID")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("CrewForeman");

                    b.Navigation("CrewMember1");

                    b.Navigation("CrewMember2");
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Employee", b =>
                {
                    b.HasOne("JasperGreenTeam11.Models.Crew", "Crew")
                        .WithMany("Employees")
                        .HasForeignKey("CrewId");

                    b.Navigation("Crew");
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Payment", b =>
                {
                    b.HasOne("JasperGreenTeam11.Models.Customer", "Customer")
                        .WithMany()
                        .HasForeignKey("CustomerId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("JasperGreenTeam11.Models.ProvideService", "ProvideService")
                        .WithMany()
                        .HasForeignKey("ProvideServiceId");

                    b.Navigation("Customer");

                    b.Navigation("ProvideService");
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Property", b =>
                {
                    b.HasOne("JasperGreenTeam11.Models.Employee", "CrewForeman")
                        .WithMany()
                        .HasForeignKey("CrewForemanId");

                    b.HasOne("JasperGreenTeam11.Models.Employee", "CrewMember1")
                        .WithMany()
                        .HasForeignKey("CrewMember1Id");

                    b.HasOne("JasperGreenTeam11.Models.Employee", "CrewMember2")
                        .WithMany()
                        .HasForeignKey("CrewMember2Id");

                    b.HasOne("JasperGreenTeam11.Models.Customer", "Customer")
                        .WithMany("Properties")
                        .HasForeignKey("CustomerId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("CrewForeman");

                    b.Navigation("CrewMember1");

                    b.Navigation("CrewMember2");

                    b.Navigation("Customer");
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.ProvideService", b =>
                {
                    b.HasOne("JasperGreenTeam11.Models.Crew", "Crew")
                        .WithMany()
                        .HasForeignKey("CrewId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("JasperGreenTeam11.Models.Customer", null)
                        .WithMany("ServiceEvents")
                        .HasForeignKey("CustomerId");

                    b.HasOne("JasperGreenTeam11.Models.Property", "Property")
                        .WithMany()
                        .HasForeignKey("PropertyId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Crew");

                    b.Navigation("Property");
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Crew", b =>
                {
                    b.Navigation("Employees");
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Customer", b =>
                {
                    b.Navigation("Properties");

                    b.Navigation("ServiceEvents");
                });

            modelBuilder.Entity("JasperGreenTeam11.Models.Employee", b =>
                {
                    b.Navigation("CrewForeman");

                    b.Navigation("CrewMember1");

                    b.Navigation("CrewMember2");
                });
#pragma warning restore 612, 618
        }
    }
}
